package com.ekalenchuk.module.service.user;

import java.util.List;

import org.springframework.social.facebook.api.FacebookProfile;

import com.ekalenchuk.module.domain.user.User;
import com.ekalenchuk.module.dto.UserDetailsInfo;
import com.ekalenchuk.module.dto.registration.UserRegistrationDto;
import com.ekalenchuk.module.dto.session.UserSession;
import com.ekalenchuk.module.exception.entity.NotFoundException;

public interface UserService {
	/**
	 * Return user from DB by unique id;
	 * 
	 * @param id
	 *            user id
	 * @return user
	 */
	User getUser(Long id);

	/**
	 * Search user in DB by login.
	 * 
	 * @param login
	 *            unique user name
	 * @return user
	 * @throws NotFoundException 
	 */
	User getUserByLogin(String login) throws NotFoundException;

	/**
	 * Return all users from DB.
	 * 
	 * @return user list
	 */
	List<User> getUsers();
	
	User registrate(final UserRegistrationDto profile);
	
	void login(final FacebookProfile profile, final UserSession userSession) throws NotFoundException;
	
	UserDetailsInfo getUserDetails(String login) throws NotFoundException;
}
